package com.xbongbong.saas.domain.entity;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * @author leex
 **/
@Getter
@Setter
@ToString
public class ShareRuleEntity implements Serializable {

    private static final long serialVersionUID = -4561633161180906935L;

    /**
     * id
     */
    private Long id;
    /**
     * 公司id
     */
    private String corpid;
    /**
     * 应用id
     */
    private Long appId;
    /**
     * 应用类型，1为saas应用，2为自建应用
     */
    private Integer saasMark;
    /**
     * 业务类型
     */
    private Integer businessType;
    /**
     * 规则名称
     */
    private String name;
    /**
     * 共享表单id
     */
    private Long formId;
    /**
     * 筛选条件
     */
    private JSONObject condition;
    /**
     * 授权用户，编辑页回显
     */
    private JSONArray authority;
    /**
     * 授权用户-角色
     */
    private JSONArray authorityRole;
    /**
     * 授权用户-部门
     */
    private JSONArray authorityDept;
    /**
     * 授权用户-成员
     */
    private JSONArray authorityUser;
    /**
     * 数据权限(可编辑、只读)
     */
    private Integer permission;
    /**
     * 添加时间
     */
    private Long addTime;
    /**
     * 更新时间
     */
    private Long updateTime;
    /**
     * 删除标志
     */
    private Integer del;

    public ShareRuleEntity() {
    }

    public ShareRuleEntity(Long id, String corpid, Long appId, Integer saasMark, Integer businessType, String name, Long formId,
                           JSONObject condition, JSONArray authority, JSONArray authorityRole, JSONArray authorityDept, JSONArray authorityUser, Integer permission, Integer del) {
        this.id = id;
        this.corpid = corpid;
        this.appId = appId;
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.name = name;
        this.formId = formId;
        this.condition = condition;
        this.authority = authority;
        this.authorityRole = authorityRole;
        this.authorityDept = authorityDept;
        this.authorityUser = authorityUser;
        this.permission = permission;
        this.del = del;
    }

}
